]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-app: Make kill switch more compact
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 10 Dec 2023 23:34:31 +0000 (00:34 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 21 Dec 2023 15:06:11 +0000 (15:06 +0000)
Instead of using a subtitle, move the stability warning into an
information popover.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3051>

subprojects/extensions-app/data/icons/scalable/actions/info-symbolic.svg [new file with mode: 0644]
subprojects/extensions-app/data/org.gnome.Extensions.data.gresource.xml.in
subprojects/extensions-app/data/ui/extensions-window.ui

diff --git a/subprojects/extensions-app/data/icons/scalable/actions/info-symbolic.svg b/subprojects/extensions-app/data/icons/scalable/actions/info-symbolic.svg
new file mode 100644 (file)
index 0000000..65d5d5d
--- /dev/null
@@ -0,0 +1 @@
+<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.906 1A7.002 7.002 0 0 0 1 8c0 3.867 3.133 7 7 7s7-3.133 7-7-3.133-7-7-7h-.094zM7.5 4h1c.277 0 .5.223.5.5v1c0 .277-.223.5-.5.5h-1a.498.498 0 0 1-.5-.5v-1c0-.277.223-.5.5-.5zM7 7h2v5H7zm0 0" fill="#2e3436"/></svg>
\ No newline at end of file
index d339d936f443c4208b64e5ca85e25a0dceb20dce..47aaf8cd8526f4536483836c7818bda32fa9245e 100644 (file)
@@ -3,6 +3,8 @@
   <gresource prefix="/org/gnome/Extensions@profile@">
     <file alias="style.css">css/style.css</file>
 
+    <file preprocess="xml-stripblanks">icons/scalable/actions/info-symbolic.svg</file>
+
     <file alias="gtk/help-overlay.ui">ui/help-overlay.ui</file>
   </gresource>
 
index 75be005c94fc62eebc0fc6825f79be85da277313..32182d965e534d1244bca3a68c4638ff794ab395 100644 (file)
                           <object class="AdwPreferencesGroup">
                             <child>
                               <object class="AdwActionRow">
-                                <property name="title" translatable="yes">Extensions</property>
-                                <property name="subtitle" translatable="yes">Extensions can cause performance and stability issues. Disable extensions if you encounter problems with your system.</property>
+                                <property name="title" translatable="yes">_Extensions</property>
                                 <property name="activatable-widget">enabledSwitch</property>
-                                <child>
+                                <property name="use-underline">true</property>
+                                <child type="suffix">
+                                  <object class="GtkMenuButton">
+                                    <property name="valign">center</property>
+                                    <property name="has-frame">false</property>
+                                    <property name="icon-name">info-symbolic</property>
+                                    <accessibility>
+                                      <property name="label" translatable="yes">More Information</property>
+                                    </accessibility>
+                                    <property name="popover">
+                                      <object class="GtkPopover" id="infoPopover">
+                                        <property name="child">
+                                          <object class="AdwClamp">
+                                            <property name="maximum-size">350</property>
+                                            <property name="tightening-threshold">350</property>
+                                            <property name="child">
+                                              <object class="GtkLabel">
+                                                <property name="label" translatable="yes">Extensions can cause performance and stability issues. It is recommended to disable all extensions if you experience problems with your system.</property>
+                                                <property name="wrap">true</property>
+                                                <!-- Hack to make the screen reader read the label -->
+                                                <property name="selectable"
+                                                          bind-source="infoPopover"
+                                                          bind-property="visible"
+                                                          bind-flags="invert-boolean|sync-create"/>
+                                              </object>
+                                            </property>
+                                          </object>
+                                        </property>
+                                      </object>
+                                    </property>
+                                  </object>
+                                </child>
+                                <child type="suffix">
                                   <object class="GtkSwitch" id="enabledSwitch">
                                     <property name="action-name">win.user-extensions-enabled</property>
                                     <property name="valign">center</property>